s = str(input('Запрос '))
f = s 
for i in 'abcdefghijklmnopqrstuvwxyz123ZYXWVUTSRQPONMLKJIHGFEDCBA1234567890!@#$%^&*_+=-,." ':
    s = s.replace(i,'')
    s = s.replace('"', "")
for i in range(len(s)):
    s = s.replace('{}', '')
    s = s.replace('()', '')
    s = s.replace('[]', '')
    s = s.replace('<>', '')
if len(s) != 0:
    print ('False', f)
else:
    print ('True', s)
